package com.example.goodpet.utils;

import android.content.res.AssetManager;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class AppNetConfig {



    //提供web应用的地址
    public static String BASE_URL;



    static {
        AssetManager assetManager = MyApplication.context.getAssets();
        Properties pro=new Properties();
        try {
            InputStream is = assetManager.open("server.properties");
            pro.load(is);
            String server = pro.getProperty("server");
            System.out.println(server);
            BASE_URL=server;
        } catch (IOException e) {
            e.printStackTrace();
        }
    }



    //获取单个用户
    public static final String GET_USER_BY_PHONE = "getUserByPhone";
    //访问登录的url
    public static final String LOGIN = "login";
    //用户注册
    public static final String REGISTER = "register";
    //图片上传
    public static final String PORTRAIT_CHANGE="portraitChange";
    //用户改变资料
    public static final String UPDATE_USER_INFORMATION="updateUserInformation";
    //上传宠物信息
    public static final String UPLOAD_PET_INFORMATION="pet/uploadInformation";
    //删除宠物信息
    public static final String DELETE_PET_INFORMATION="pet/deleteInformation";
    //获取我发布的信息
    public static final String GET_MY_RELEASE = "user/getMyRelease";
    //发送收藏请求
    public static final String PET_COLLECT="user/petCollect";
    // 获取我的收藏
    public static final String GET_PET_COLLECTION="user/getPetCollection";
    //删除我的收藏信息
    public static final String DELETE_PET_COLLECT = "user/deletePetCollect";
    //查询用户是否已经关注宠物信息帖子
    public static final String IS_PET_COLLECT = "user/isPetCollect";
    //记录浏览历史
    public static final String RECORD_GOODPET_HISTORY="user/recordGoodpetHistory";
    //获取宠物浏览历史
    public static final String GET_PET_HISTORY = "user/getGoodpetHistory";
    //清空浏览历史
    public static final String CLEAR_PET_HISTORY = "user/clearPetHistory";
/*    //获取用户发布的信息
    public static final String GET_USER_RELEASE="pet/getUserRelease";*/
    //初始化UserInfoActivity
    public static final String INIT_USERINFO_ACTIVITY="user/initUserInfoActivity";
    //获取我的关注
    public static final String GET_MY_FOLLOW="user/getMyFollow";
    //获取我的粉丝
    public static final String GET_MY_FENSI="user/getMyFensi";
    // 关注某人
    public static final String FOLLOW_SOMEONE="user/followSomeone";
    // 取消关注
    public static final String UNFOLLOW_SOMEONE="user/unFollowSomeone";
    //初始化petinfoActivity信息
    public static final String INIT_PET_INFO_ACTIVITY="userPetInfo/initPetInfoActivity";
    // 获取我的关注的近期更新
    public static final String GET_MY_FOLLOW_UPDATE="user/getMyFollowUpdate";
    // 根据nickname模糊查询user
    public static final String GET_USER_BY_NICKNAME="user/getUserByNickname";

    //上传帖子信息
    public static final String UPLOAD_TIEZI_INFO="community/uploadTieziInfo";
    //获取用户的帖子信息
    public static final String GET_USER_TIEZI="community/getUserTiezi";
    //删除用户的帖子信息
    public static final String DELETE_TIEZI_BY_TIEZIID="community/deleteTieziByTieziId";

    //获取用户关注的帖子信息
    public static final String GET_USER_TIEZI_COLLECT="community/getTieziCollect";

    //获取用户点赞的帖子信息
    public static final String GET_USER_Likes="community/getUserLikes";

    //获取帖子的浏览历史
    public static final String GET_MY_TIEZI_HISTORY="community/getMyTieziHistory";
    //上传文件
    public static final String UPLOAD_FILE="uploadFile";
}
